<me:UIPDC  x:Class="WPFExcelReport.TYGRPDCBB"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
     xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
     xmlns:me="clr-namespace:WPFExcelReport"  
    x:Name="TV"
    Loaded="Window_Loaded"
 >
    <me:UIPDC.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIPDC.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0" Grid.Column="0" Margin="0,0,0,0">
            <TextBlock Margin="10,0,0,0" HorizontalAlignment="Center" Height="21" FontSize="18"  Text="{Binding Source={Localization:Translate Word=批号}}" Width="40"></TextBlock>
            <TextBox  Margin="5,0,0,0" Text="" Name="txtLOT" FontSize="18" CharacterCasing="Upper" Width="116" MaxLength="10" Height="31" Panel.ZIndex="1"></TextBox>
            <TextBlock  Margin="10,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=设备}}" Height="20"></TextBlock>
            <TextBox Margin="5,0,0,0" Text="" Name="txtBDE" FontSize="18" CharacterCasing="Upper"  Width="56" MaxLength="5" Panel.ZIndex="2"></TextBox>
            <TextBlock  Margin="10,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=档车工}}" Height="20"></TextBlock>
            <TextBox Margin="5,0,0,0" Text="" Name="txtSTAFF" FontSize="18" CharacterCasing="Upper"  Width="92" MaxLength="8" Panel.ZIndex="3"></TextBox>
            
            <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" 
                        Text="{Binding DTSTART,ElementName=TV}" VerticalAlignment="Top" Panel.ZIndex="4"
                                SelectedDateChanged ="DTSTART_SelectedDateChanged" Width="125" />
            <Label Content="{Binding Source={Localization:Translate Word=到}}" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" Name="label3" VerticalAlignment="Top" Width="33" FontSize="16" />
            <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Text="{Binding DTEND,ElementName=TV}" 
                        VerticalAlignment="Top" Panel.ZIndex="5"
                                SelectedDateChanged ="DTEND_SelectedDateChanged" Width="122" />
            <TextBlock Text="{Binding DTSTART}" FontSize="12"></TextBlock>
            <TextBlock Text="{Binding DTEND}"  FontSize="12"></TextBlock>
            <Button  Margin="10,0,0,0"  Width="35" Height="31" Name="btnQuery"  Click="QueryCommand" Panel.ZIndex="6">
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                </Button.Background>
            </Button>
            <Button FontSize="18" Height="31" Width="38" Margin="10,0,0,0"   Click="btnExport_Click" Panel.ZIndex="7">
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Print.png" />
                </Button.Background>
            </Button>
            <Button Content="{Binding Source={Localization:Translate Word=跨度超过10天，请使用}}" Click="btnQExport_Click"></Button>
        </WrapPanel>
        <DataGrid Grid.Row="1" Grid.Column="0"
                    VerticalAlignment="Top"  
                    AutoGenerateColumns="False"
                    EnableRowVirtualization="False"
                    VerticalScrollBarVisibility="Auto"
                    HorizontalScrollBarVisibility="Auto"
                    HeadersVisibility="Column"                 
                    HorizontalAlignment="Stretch"   
                    Name="dlgMaster"
                    ItemsSource="{Binding Source={StaticResource vwMaster}}"
                  RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0,0,0" 
                    >
            <DataGrid.Columns>
                <!--PDCDATE	JP10	ABFAUFKRS	ABFAUFLFD	ABFAUFPOS	ABPART	ABPFARBE	
                        AMBDEMA	PDCSTAFF	PDCSHIFT	QTY	AMAUFTRVON	JP03	JP02	JP06	JP12-->
                <DataGridTextColumn Binding="{Binding Path=PDCDATE}" Header="{Binding Source={Localization:Translate Word=产量日期}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP10}" Header="{Binding Source={Localization:Translate Word=批号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP14}" Header="{Binding Source={Localization:Translate Word=标注}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=""  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD}" Header="{Binding Source={Localization:Translate Word=生产单}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS}" Header=""  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="{Binding Source={Localization:Translate Word=品种}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="{Binding Source={Localization:Translate Word=色号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=AMBDEMA}" Header="{Binding Source={Localization:Translate Word=机台}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=PDCSTAFF}" Header="{Binding Source={Localization:Translate Word=档车工}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=PDCSHIFT}" Header="{Binding Source={Localization:Translate Word=班次}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=QTY}" Header="{Binding Source={Localization:Translate Word=数量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=AMAUFTRVON}" Header="{Binding Source={Localization:Translate Word=入工数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP03}" Header="{Binding Source={Localization:Translate Word=出工数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP02}" Header="{Binding Source={Localization:Translate Word=实开锭数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP06}" Header="{Binding Source={Localization:Translate Word=KM}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP12}" Header="{Binding Source={Localization:Translate Word=号数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP28}" Header="{Binding Source={Localization:Translate Word=落纱次数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP15}" Header="{Binding Source={Localization:Translate Word=折合落纱}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP20}" Header="{Binding Source={Localization:Translate Word=落纱姓名}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP25}" Header="{Binding Source={Localization:Translate Word=换纱姓名}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP24}" Header="{Binding Source={Localization:Translate Word=换纱个数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP26}" Header="{Binding Source={Localization:Translate Word=铺台个数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP27}" Header="{Binding Source={Localization:Translate Word=生头个数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP16}" Header="{Binding Source={Localization:Translate Word=折合换纱}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIPDC>
